package com.yituo.mjworld.mvc.entity.web;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "other_token", schema = "web_mojianworld_server", catalog = "")
public class OtherToken {
  private String accounts;
  private String token;
  private int userType;
  private Date createDate;
  private Date endDate;

  @Id
  @Column(name = "accounts", nullable = false, length = 50)
  public String getAccounts() {
    return accounts;
  }

  public void setAccounts(String accounts) {
    this.accounts = accounts;
  }

  @Basic
  @Column(name = "token", nullable = false, length = 400)
  public String getToken() {
    return token;
  }

  public void setToken(String token) {
    this.token = token;
  }

  @Basic
  @Column(name = "userType", nullable = false)
  public int getUserType() {
    return userType;
  }

  public void setUserType(int userType) {
    this.userType = userType;
  }

  @Basic
  @Column(name = "createDate", nullable = false)
  public Date getCreateDate() {
    return createDate;
  }

  public void setCreateDate(Date createDate) {
    this.createDate = createDate;
  }

  @Basic
  @Column(name = "endDate", nullable = false)
  public Date getEndDate() {
    return endDate;
  }

  public void setEndDate(Date endDate) {
    this.endDate = endDate;
  }


  @Override
  public int hashCode() {
    int result = accounts != null ? accounts.hashCode() : 0;
    result = 31 * result + (token != null ? token.hashCode() : 0);
    result = 31 * result + userType;
    result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
    result = 31 * result + (endDate != null ? endDate.hashCode() : 0);
    return result;
  }
}
